https://glot.io/snippets/gi5okjlslz/raw/main.lua